﻿using HNCSolutions.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace HNCSolutions.Controllers
{
    public class LayoutController : Controller
    {
        public ActionResult _Menu()
        {
            HNCSolutionsEntities container = new HNCSolutionsEntities();

            return PartialView(container.Menus.Where(mn => mn.TrangQuanTri.HasValue && !mn.TrangQuanTri.Value).ToList());
        }

        public PartialViewResult _SlideshowBanner()
        {
            Banner bannerTrangChu = new Banner { Action = "Index", Controller = "Home", ImagePath = "/Images/Website/banner_2.gif" };
            Banner bannerGioiThieu = new Banner { Action = "About", Controller = "Home", ImagePath = "/Images/Website/banner3.jpg" };
            Banner bannerLienHe = new Banner { Action = "Index", Controller = "ThietBiVoIP", ImagePath = "/Images/Website/VoIPBanner.jpg" };

            return PartialView(new List<Banner> { bannerTrangChu, bannerGioiThieu, bannerLienHe });
        }

        public PartialViewResult _MenuChinh()
        {
            return PartialView();
        }        

        public PartialViewResult _LinkFooter()
        {
            return PartialView();
        }

        public PartialViewResult _TinTuc()
        {
            return PartialView();
        }

        public PartialViewResult _SanPhamTieuBieu()
        {
            return PartialView();
        }

        #region Left
        public PartialViewResult _NhomSanPham()
        {
            return PartialView();
        }
        #endregion

        #region Center
        public PartialViewResult _DanhSachSanPham(string tieuDe, int loaiSanPham, int soDong, int soCot)
        {
            DanhSachSanPhamModel model = new DanhSachSanPhamModel { TieuDe = tieuDe, LoaiSanPham = loaiSanPham, SoLuongDong = soDong, SoLuongCot = soCot };
            return PartialView(model);
        }
        #endregion

        #region Right
        public PartialViewResult _HoTroTrucTuyen()
        {
            return PartialView();
        }

        public PartialViewResult _HuongDanSuDung()
        {
            return PartialView();
        }

        public PartialViewResult _ThietKeWeb()
        {
            return PartialView();
        }
        #endregion
    }
}
